﻿@model Models.WebSite_HaiSheng.Article
@using Utilities
@using Models
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $('#Content').wysiwyg({
            controls: {
                strikeThrough: { visible: true },
                underline: { visible: true },

                separator00: { visible: true },

                justifyLeft: { visible: true },
                justifyCenter: { visible: true },
                justifyRight: { visible: true },
                justifyFull: { visible: true },

                separator01: { visible: true },

                indent: { visible: true },
                outdent: { visible: true },

                separator02: { visible: true },

                subscript: { visible: true },
                superscript: { visible: true },

                separator03: { visible: true },

                undo: { visible: true },
                redo: { visible: true },

                separator04: { visible: true },

                insertOrderedList: { visible: true },
                insertUnorderedList: { visible: true },
                insertHorizontalRule: { visible: true },

                h4mozilla: { visible: true && $.browser.mozilla, className: 'h4', command: 'heading', arguments: ['h4'], tags: ['h4'], tooltip: "Header 4" },
                h5mozilla: { visible: true && $.browser.mozilla, className: 'h5', command: 'heading', arguments: ['h5'], tags: ['h5'], tooltip: "Header 5" },
                h6mozilla: { visible: true && $.browser.mozilla, className: 'h6', command: 'heading', arguments: ['h6'], tags: ['h6'], tooltip: "Header 6" },

                h4: { visible: true && !($.browser.mozilla), className: 'h4', command: 'formatBlock', arguments: ['<H4>'], tags: ['h4'], tooltip: "Header 4" },
                h5: { visible: true && !($.browser.mozilla), className: 'h5', command: 'formatBlock', arguments: ['<H5>'], tags: ['h5'], tooltip: "Header 5" },
                h6: { visible: true && !($.browser.mozilla), className: 'h6', command: 'formatBlock', arguments: ['<H6>'], tags: ['h6'], tooltip: "Header 6" },

                separator07: { visible: true },

                cut: { visible: true },
                copy: { visible: true },
                paste: { visible: true }
            }
        });
    });
</script>
@Html.ValidationSummary(true)
<fieldset>
    <legend>文章</legend>
    <div class="editor-label">
        @Html.LabelFor(model => model.Title)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Title)
        @Html.ValidationMessageFor(model => model.Title)
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.SubTitle)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.SubTitle)
        @Html.ValidationMessageFor(model => model.SubTitle)
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.Pubulisher)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Pubulisher)
        @Html.ValidationMessageFor(model => model.Pubulisher)
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.PubulishTime)
    </div>
    <div class="editor-field">
        @Html.Telerik().DateTimePickerFor(model => model.PubulishTime)
        @Html.ValidationMessageFor(model => model.PubulishTime)
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.Content)
    </div>
    <div class="editor-field">
        @Html.TextAreaFor(model => model.Content)
        @Html.ValidationMessageFor(model => model.Content)
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.ArticleType)
    </div>
    <div class="editor-field">
        @Html.DropDownListFor(model => model.ArticleType, new SelectList(new List<string>() { "热点信息", "作业动态" }), "-请选择-")
        @Html.ValidationMessageFor(model => model.ArticleType)
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.Description)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Description)
        @Html.ValidationMessageFor(model => model.Description)
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.Sequence)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Sequence)
        @Html.ValidationMessageFor(model => model.Sequence)
    </div>
    <p>
        <input type="submit" value=@SR.Save />
    </p>
</fieldset>
